//
//  HJAboutLejianVC.m
//  project
//
//  Created by yefei on 2019/7/24.
//  Copyright © 2019 健健. All rights reserved.
//

#import "HJAboutLejianVC.h"

@interface HJAboutLejianVC ()
@property (weak, nonatomic) IBOutlet UIImageView *logoIcon;
@property (weak, nonatomic) IBOutlet UILabel *appDisplayName;

@property (weak, nonatomic) IBOutlet UILabel *appVersion;
@property (weak, nonatomic) IBOutlet UIButton *zanBtn;
@property (weak, nonatomic) IBOutlet UIButton *recommendBtn;
@property (weak, nonatomic) IBOutlet UIButton *xieyiBtn;
@end

@implementation HJAboutLejianVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.navTitle = @"关于乐见";
    self.view.backgroundColor = [UIColor whiteColor];
    [self.logoIcon rounded:UIRectCornerAllCorners radius:5];
    
    self.appDisplayName.text = [CommonTools appDisplayName];
    self.appVersion.text = [NSString stringWithFormat:@"版本：%@",[CommonTools appVersion]];
    
    [[self.zanBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(__kindof UIControl * _Nullable x) {
        LKLog(@"赞");
    }];
    
    [[self.recommendBtn rac_signalForControlEvents:UIControlEventTouchUpInside]subscribeNext:^(__kindof UIControl * _Nullable x) {
        LKLog(@"推荐");
    }];
    @weakify(self)
    [[self.xieyiBtn rac_signalForControlEvents:UIControlEventTouchUpInside]subscribeNext:^(__kindof UIControl * _Nullable x) {
        @strongify(self)
        NSURL * url = [[NSBundle mainBundle] URLForResource:@"agreement.html" withExtension:nil];
        HJWebViewController * webVC =[HJWebViewController new];
        webVC.navTitle = @"乐见用户协议";
        webVC.URLString = url.absoluteString;
        [self.navigationController pushViewController:webVC animated:YES];
    }];
    
    
    
}


@end
